package me.predatorray.xcollection;

import java.util.Collection;

public interface XCollection<E> extends Collection<E> {

    <T> XCollection<T> map(Mapper<E, T> mapper);

    E reduce(Reducer<E> reducer);

    E reduceLeft(Reducer<E> reducer);

    E reduceRight(Reducer<E> reducer);

    E foldLeft(E initVal, Reducer<E> reducer);

    E foldRight(E initVal, Reducer<E> reducer);

    XCollection<E> scan(E initVal, Reducer<E> reducer);

    XCollection<E> scanLeft(E initVal, Reducer<E> reducer);

    XCollection<E> scanRight(E initVal, Reducer<E> reducer);

    XCollection<E> filter(Filter<E> filter);
}
